#
# Given a string s consists of upper/lower-case alphabets and empty space characters ' ', 
# return the length of last word in the string.If the last word does not exist, return 0.
#

# @author: timlentse(tinglenxan@gmail.com)
# @Date:2014-11-15
#! usr/bin/python
class Solution:
    # @param s, a string
    # @return an integer
    def lengthOfLastWord(self, s):
        Words = s.split()
        return len(Words[-1]) if Words else 0
solv = Solution()
testString = "Hello World"
print solv.lengthOfLastWord(testString);

        